parses nested fragment selections